-
Notifications
You must be signed in to change notification settings - Fork 190
Migrate to Hugo #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Migrate to Hugo #56
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Right now, Git for Windows' home page is built using `grunt`, and the result is then committed and uploaded to GitHub Pages. However, a much more natural development experience can be achieved by using Hugo (https://gohugo.io/) instead. In preparation for migrating to Hugo, let's drop all `grunt`-based stuff. Note that the `create-screenshot-thumbnails.js` script would still need the `jimp` dependency defined in `package.json`, but that script is not run on a regular basis. Signed-off-by: Johannes Schindelin <[email protected]>
The default layout is a slightly edited resurrection of the just-deleted `markdown-template.html`. Signed-off-by: Johannes Schindelin <[email protected]>
Hugo has a bit of an opinionated directory layout, at least on its paved path. Signed-off-by: Johannes Schindelin <[email protected]>
The 32-bit, governance-model and requirements pages are now generated via Hugo. Signed-off-by: Johannes Schindelin <[email protected]>
When a web font's URL is specified via `href="//<host>"`, the protocol is inherited from the loaded page. That's all good and fine if `https` (or even `http`) is used to load the page, but falls apart when the protocol is `file`, as it is the case when testing locally. Therefore, let's just use `https` instead. This should be used nowadays instead of `http`, anyways. Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
They are handled by a custom output format, for details, see https://gohugo.io/configuration/output-formats/#create-an-output-format. Signed-off-by: Johannes Schindelin <[email protected]>
The `bump-version.js` script is used by Git for Windows' automation to update the web page whenever a new version is published. Now that the web pages are generated via Hugo, we need to update this script, too. Signed-off-by: Johannes Schindelin <[email protected]>
Now those are generated automatically, too. Signed-off-by: Johannes Schindelin <[email protected]>
This allows for better reuse of the footer. (And yes, it is not quite correct a name, given that the current pages also show it at a header; This will all make more sense once the home page is converted to Hugo, where a different header is shown.) Signed-off-by: Johannes Schindelin <[email protected]>
Inline CSS is hard to manage, so let's move it elsewhere. To prepare for migrating also the home page to Hugo, let's make that inline CSS contingent on <body> having the `page` class. Signed-off-by: Johannes Schindelin <[email protected]>
There are still plenty of HTML constructs in there; This is okay, as Markdown explicitly allows for that _and_ because some of those constructs are not easily expressed in Markdown (such as links with the `target="_blank"` attribute). Signed-off-by: Johannes Schindelin <[email protected]>
This commit adds a GitHub workflow that runs in all Pull Requests, to verify that the site builds. Signed-off-by: Johannes Schindelin <[email protected]>
This finishes the transition to a Hugo-backed site. Signed-off-by: Johannes Schindelin <[email protected]>
The site can also be seen live here: https://dscho.github.io/git-for-windows.github.io/ |
mjcheetham
approved these changes
Mar 10, 2025
This has been there for ages, but is unlikely to be needed: Internet Explorer was retired a long time ago. Besides, Hugo silently removes this, so... Signed-off-by: Johannes Schindelin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In preparation for moving Git for Windows' wiki pages to https://gitforwindows.org/, let's modernize the deployment: Instead of doing some home-grown static site generation, committing the HTML files and then deploying all files, let's use Hugo instead.
This has served https://git-scm.com/ well, and I also already converted https://gitgitgadget.github.io/ (as an exercise in preparation for this here PR).
Here are the visual changes: